package project8;

public class Main {
    public static void main(String[] args) {
        Fruit f1=new Fruit();
        Fruit f2=new Fruit();
        double aver;
        f1.setColor("yellow");
        f1.setWeight(0.86);
        f2.setColor("red");
        f2.setWeight(0.73);
        aver=(f1.getWeight()+f2.getWeight())/2;
        String format=String.format("%.2f",f1.getWeight());
        String format1=String.format("%.2f",f2.getWeight());
        String format2=String.format("%.2f",aver);
        System.out.println(f1.getColor()+Double.parseDouble(format)+"\n"+f2.getColor()+Double.parseDouble(format1)
                +"\n"+Double.parseDouble(format2));
    }

}
